//定义一个元组数据类型
let sa:[string,number]=["亢园园",21]
let hhh:[string,number]
hhh=["hei",20]
//定义一个数组数据类型
let arr:number[]=[]
arr[0]=12
//Boolean数据类型
let isTrue:boolean=false
let isTrue1:boolean
//string数据类型
let isString:boolean=false
let isString1:boolean
//number数据类型
let isNumber:boolean=false
let isNumber1:boolean
//枚举数据类型
let isEnum:boolean=false
let isEnum1:boolean

enum Color {Red,Green,Blue}
console.log(Color,"Color");
//作业二
let aa1:string="sss"
let bb1:number=44

let sz1:number[]=[1,5,9]
let sz11:number[]
sz11=[32,1,2]

let sz2:Array<number>=[84,43,21]

let yz:[string,number]=["as",88]
//push 末尾添加 pop 删除最后一个 unshift 开头添加  shift 开头删除 splice 删除添加修改 sort 排序 slice 截取 indexof 找出第一个符合的元素的下标

//作业三
let fun =(arr:any):any=>{
    arr.length=arr.length-1
    return arr
}
console.log(fun([1,null,NaN,2,undefined]));

var push =function(a:any){
    var arr1=arguments[0]
    for(var i=1;i<arguments.length;i++){
        arr1[arr1.length]=arguments[i]
    }
    console.log(arr1);
    return arr1.length
}
console.log(push([[1,2,3],"hello","world"]));
